﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ETFK.CSharpBase
{
    class CS0001:IPractise
    {
        public CheckResult Check(object Target)
        {

            TestCase tcMax = new TestCase(this, Target, "Max");

            if (tcMax.CheckMethod() == false)
            {
                return CheckResult.RunNG;
            }

            for (int i = 0; i < 10; i++)
            {
                CheckRecord.Add("".PadLeft(80,'/'));
                CheckRecord.Add("开始创建测试数据：");
                tcMax.SetParameter(0, RandomData.NextInt());
                tcMax.SetParameter(1, RandomData.NextInt());

                if (tcMax.Run() == false)
                {
                    return CheckResult.RunNG;
                }
            }

            
            
            return CheckResult.RunOK;
        }

        public int Max(int a,int b)
        {
            return Math.Max(a, b);
        }
    }
}
